package org.ala.tiktools.mybatis.expand;

/**
 * 扩展的数据
 *
 * @author ala
 * @date 2025-01-10 15:53
 */
public class ExpandData {


    /**
     *  一些公共的key
     */
    public static final String KEY_SHARD_TX = "shard_transaction";


    protected String key;
    protected Object value;
    /**
     *  参数是否扩展到mybatis里
     */
    protected boolean expandToMBatis;


    public static ExpandData build(String key, Object value, boolean expandToMBatis) {
        ExpandData ed = new ExpandData();
        ed.key = key;
        ed.value = value;
        ed.expandToMBatis = expandToMBatis;
        return ed;
    }


    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public boolean isExpandToMBatis() {
        return expandToMBatis;
    }

    public void setExpandToMBatis(boolean expandToMBatis) {
        this.expandToMBatis = expandToMBatis;
    }
}
